package com.ysd.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ysd.entity.Address;
import com.ysd.mapper.AddressMapper;
import com.ysd.service.AddressService;

@Service
public class AddressServiceImpl implements AddressService {
	
	@Autowired
	AddressMapper addressmapper;

	@Override
	public List<Address> findAddresss(int belongToUserId) {
		return addressmapper.getAddresss(belongToUserId);
	}

	@Override
	public int tianJiaAddress(Address address) {
		return addressmapper.insertAddress(address);
	}

	@Override
	public int deleteAddress(int a_id) {
		return addressmapper.delAddress(a_id);
	}
	
	@Override
	public Address selAddress(Address address) {
		return addressmapper.cxAddress(address);
	}

	@Override
	public int upAddress(Address address) {
		return addressmapper.xgAddress(address);
	}
}
